<div class="row">
    <div class="col-lg-12">
        <h3 class="page-header">Danh sách nhân viên kinh doanh</h3>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">  
            <div class="panel-body">
                <div class="table-reponsive">
                    <form name="add_question" id="add_question" action="<?php echo $this->url(array("action"=>"messger")) ?>">
                        <table name="list_question" id="list_question">                         
                              <?php 
                                 foreach($this->data as $item){
                                   echo " <tr>
                                        <td class=\"a\"id=\"abc".$item->getId()."\"><input class=\"checkbox\" type=\"checkbox\" name=\"select_question\" id=\"id".$item->getId()."\"></td>
                                        <td class=\"u\">".$item->getUserName()."</td>
                                        <td class=\"t\">".$item->getLast_Name()." ".$item->getFirst_Name()."</td>
                                        <td class=\"q\" >".$item->getPhone()."</td>
                                        </tr>
                                            ";}                                    
                               ?>                          
                        </table>
                          <?php 
                                echo $this->paginationControl($this->data, 'Sliding' , 'feedback/pagination.phtml'); 
                          ?>
                        <input style="display:none;" type ="text" name="list_selectQuestion" id="list_selectQuestion" value="" >
                           </br>
                        <div class="form-group">
                            <center> 
                                <button type="submit" class="btn btn-default"id="submit">Chọn</button>
                                <button type="reset" class="btn btn-default" id="reset">Làm lại</button>
                            </center>
                        </div>
                    </form>    
                </div>
            </div>
    </div>
</div>
<style>
    table { margin:10px auto; border-collapse:collapse; border:1px solid gray; }
    td,th { border:1px solid gray; text-align:left; padding:20px; }
    td.opt1 { text-align:center; vertical-align:middle; }
    td.opt2 { text-align:right; }
</style>
<script type="text/javascript">
    $("input.checkbox").change(function(){
        var str="";
        $("input.checkbox").each(function(index){            
            if($("input.checkbox").eq(index).is(':checked'))
            {                
                str = str+ $("input.checkbox").eq(index).attr('id');                   
                str=str.replace("id","");                
                str =str+",";
                
            }
                //alert($("input.checkbox").eq(index).attr('id'));            
        });                        
        $("#list_selectQuestion").val(str);
    });
</script>